package com.nofeng.wx.controller.stock.view.template;

public class WxGzhETFData {
    private String name;
    private double pe;
    private String close;
    private String chp;
    private String percentile;
    private String proportion;
    private String status;
    private String statusClass;

    // 构造函数
    public WxGzhETFData(String name, double pe, String percentile, String proportion, String status) {
        this.name = name;
        this.pe = pe;
        this.percentile = percentile;
        this.proportion = proportion;
        this.status = status;

        // 根据状态设置CSS类
        switch (status) {
            case "偏低":
                this.statusClass = "low";
                break;
            case "低估":
                this.statusClass = "under";
                break;
            case "极度低估":
                this.statusClass = "extreme";
                break;
            default:
                this.statusClass = "low";
        }
    }

    // Getter和Setter方法
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }

    public double getPe() { return pe; }
    public void setPe(double pe) { this.pe = pe; }

    public String getPercentile() { return percentile; }
    public void setPercentile(String percentile) { this.percentile = percentile; }

    public String getProportion() { return proportion; }
    public void setProportion(String proportion) { this.proportion = proportion; }

    public String getStatus() { return status; }
    public void setStatus(String status) {
        this.status = status;
        // 更新状态类
        switch (status) {
            case "偏低":
                this.statusClass = "low";
                break;
            case "低估":
                this.statusClass = "under";
                break;
            case "极度低估":
                this.statusClass = "extreme";
                break;
            default:
                this.statusClass = "low";
        }
    }

    public String getStatusClass() { return statusClass; }

    public String getClose() {
        return close;
    }

    public void setClose(String close) {
        this.close = close;
    }

    public String getChp() {
        return chp;
    }

    public void setChp(String chp) {
        this.chp = chp;
    }
}
